﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Mogre;

namespace ProjetSMA.View.Mogre
{
    public class Rock3D : Element3D
    {
        public Rock3D(Model.Element par_item, SceneManager par_smngr, string par_name)
            : base(par_item, par_smngr, par_name)
        {
            // this.m_color = System.Drawing.Color.YellowGreen;
        }


        public override void Initialisation()
        {


            m_entity = m_scene_mngr.CreateEntity(m_name, "cube.mesh");

            m_node = m_scene_mngr.RootSceneNode.CreateChildSceneNode(m_name);

            m_node.Position = new Vector3(m_position.x, m_position.y + m_coef * m_height_item + 12f, m_position.z);
            m_node.Scale(0.2f, 0.25f, 0.2f);


            m_entity.SetMaterialName("Examples/ElementRock3D");

            m_entity.CastShadows = false;

            m_node.AttachObject(m_entity);
          //  m_node_bis.AttachObject(m_entity_bis);

        }
    }
}
